import React, { createContext, ReactNode } from 'react';

interface SlotScopeProviderProps {
  name: string;
  children: (slots: Record<string, ReactNode>) => ReactNode;
}

export const SlotScopeContext = createContext<Record<string, any>>({});

export function SlotScopeProvider({ name, children }: SlotScopeProviderProps) {
  const scope: Record<string, any> = {};

  function registerScope(key: string, value: any) {
    scope[key] = value;
  }

  return (
    <SlotScopeContext.Provider value={{}}>
      {children(scope)}
    </SlotScopeContext.Provider>
  );
}
